//订单模块
import http from "../utils/request"

//获取产品  vip充值
export const getVipListApi  = (category_id) => http.get("/product/get_product" , {
    params:{
        category_id : '20210827165510715',
    }
})


//查询订单
export const getOrderApi = (order_id) => http.post("/order/get_order")

//获取商品信息
export const getProductDetailApi = (product_id) => http.get("/product/get_product" , {
    params:{
        product_id
    }
})

//预支付下单
export const preOrderApi  = (product_id,quantity) => http.post("/order/pre_order",{product_id,quantity})



//获取订单详情
export const getOrderDetail = order_id => {
    console.log(order_id)
    return http.post('/order/get_order', { order_id })}


//获取支付地址
export const pay = order_id => http.post("/pay/payment", { order_id })



//查询支付状态
export const queryPayStatus = order_id => http.get('/order/query_order_status',{
    params:{
        order_id
    }
})